package algotithm.interview.欧科云链.test2;

import java.io.*;
import java.util.Deque;
import java.util.LinkedList;

/**
 * @author zhouyanxiang
 * @Date 2021-04-2021/4/14-17:54
 */
public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

        String[] str = reader.readLine().split(" ");
        int n = str.length;
        int[] arr = new int[n];
        MaxStack m = new MaxStack();
        for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(str[i]);
            m.push(arr[i]);
        }
        int max = m.getMax();
        writer.write(max + "\n");
        writer.flush();
        writer.close();
        reader.close();
    }

}
class MaxStack {
    Deque<Integer> xStack;
    Deque<Integer> maxStack;

    public MaxStack () {
        xStack = new LinkedList<>();
        maxStack = new LinkedList<>();
        maxStack.push(Integer.MIN_VALUE);
    }

    public void push (int x) {
        xStack.push(x);
        maxStack.push(Math.max(maxStack.peek(),x));
    }

    public void pop() {
        xStack.pop();
        maxStack.pop();
    }

    public int top() {
        return xStack.peek();
    }

    public int getMax() {
        return maxStack.peek();
    }
}